package com.yunxin.core.domain.model.order;


import com.yunxin.core.application.dto.order.ChannelPromotionTwoUvStatisticsVo;
import org.apache.ibatis.annotations.Param;

/**
 * @author zero°
 * @since 2023-07-17
 */
public interface OrderUserUvRepository {

    /**
     * 保存
     * @param orderUserUv orderUserUv
     * @return boolean
     */
    boolean saveOrderUserUv(OrderUserUv orderUserUv);

    /**
     * 更新提交时间
     * @param id id
     * @return boolean
     */
    boolean updateSubmitTime(Long id);

    /**
     * 根据用户和产品查询uv订单id
     * @param userCode userCode
     * @param productId productId
     * @return Long
     */
    Long getOrderUserUvIdByUserAndProduct(String userCode, Long productId);

    /**
     * 查询二次uv需要保存的数据
     * @param userCode
     * @param productId
     * @param channelId
     * @return
     */
    ChannelPromotionTwoUvStatisticsVo selectOrderUserDetail(String userCode,Long productId,Long channelId);

    /**
     * 保存二次uv统计数据
     * @param dto
     */
    void saveOrderUserTwoUv(ChannelPromotionTwoUvStatisticsVo dto);

}
